AxonASP Server
AxonASP WASM Playground
Loading WASM module...
<% Dim Axon Set Axon = Server.CreateObject("G3AXONLIVE") If Axon.InitPage() Then ' We are handling an async WASM event! If Axon.EventName = "click" Then Dim currentCount currentCount = Axon.GetComponentProperty("btn1", "data-count") If IsEmpty(currentCount) Or currentCount = "" Then currentCount = 0 currentCount = CInt(currentCount) + 1 ' Update internal state Axon.SetComponentProperty "btn1", "data-count", currentCount ' Directly manipulate the DOM via WASM syscall/js! Dim comp Set comp = Axon.GetComponent("btn1") comp.SetStyle "background", "green" comp.SetStyle "color", "white" comp.SetValue "Clicked " & currentCount & " times!" ElseIf Axon.EventName = "ask_name" Then Dim userName userName = InputBox("What is your name?", "AxonASP WASM", "Guest") If userName <> "" Then If MsgBox("Hello " & userName & "! Do you like WebAssembly?", vbYesNo + vbQuestion) = vbYes Then MsgBox "Great! AxonASP loves WASM too." Else MsgBox "Oh, maybe next time!" End If End If End If Axon.EndAsyncResponse() End If ' Initial Page Render Response.Write "
AxonLive in WASM!
" Response.Write "
Click the buttons to interact with the AxonASP engine natively in your browser.
" Response.Write "
Reactive Counter
" Response.Write "
Interactive Prompts
" %>
Run ASP Code
Output